#pragma once

#include <string>
#include <memory>
#include <mysql/mysql.h>

class DBManager {
public:
    static DBManager& getInstance();
    
    bool init(const std::string& host, 
             const std::string& port,
             const std::string& user,
             const std::string& password,
             const std::string& database);
             
    bool connect(const std::string& host, 
                const std::string& port,
                const std::string& user,
                const std::string& password,
                const std::string& database);
             
    MYSQL* getConnection() { return mysql_; }
    
    ~DBManager();

private:
    DBManager() = default;
    DBManager(const DBManager&) = delete;
    DBManager& operator=(const DBManager&) = delete;
    
    MYSQL* mysql_ = nullptr;
}; 